srcdir       = @srcdir@
VPATH        = $(srcdir)
top_builddir = @top_builddir@
top_srcdir   = @top_srcdir@

TARGET    = sample-repl sample-repl-nogdbm sample-repl-nombed
GENERATED = *.c
CONFIG_GENERATED = Makefile

all: $(TARGET)

clean:
	rm -f core *~ $(TARGET) $(GENERATED)

distclean: clean
	rm -f $(CONFIG_GENERATED)

maintainer-clean: clean
	rm -f $(CONFIG_GENERATED)

sample-repl: sample-repl.scm
	$(top_builddir)/src/gosh -ftest build-standalone \
             --header-dir $(top_srcdir)/src              \
             --header-dir $(top_srcdir)/gc/include       \
             --library-dir $(top_builddir)/src           \
             -o sample-repl sample-repl.scm

sample-repl-nogdbm: sample-repl.scm
	$(top_builddir)/src/gosh -ftest build-standalone \
             -D GAUCHE_STATIC_EXCLUDE_GDBM               \
             --header-dir $(top_srcdir)/src              \
             --header-dir $(top_srcdir)/gc/include       \
             --library-dir $(top_builddir)/src           \
             -o sample-repl-nogdbm sample-repl.scm

sample-repl-nombed: sample-repl.scm
	$(top_builddir)/src/gosh -ftest build-standalone \
             -D GAUCHE_STATIC_EXCLUDE_GDBM               \
             -D GAUCHE_STATIC_EXCLUDE_MBEDTLS            \
             --header-dir $(top_srcdir)/src              \
             --header-dir $(top_srcdir)/gc/include       \
             --library-dir $(top_builddir)/src           \
             -o sample-repl-nombed sample-repl.scm

